<extend name="Bt/register_back_base"/>
<block name="content">
    <div class="context" style="position: relative;height:900px">
        <form class="login-form" id="J_findpwd_form" action="{:U('Member/mi')}" method="post">
            <div class="ctPdding ">
                <div class="ct_header"><i></i>找回密码</div>
                <hr />
                <div class="regContainer">
                    <div class="regItme">
                        <ul>
                            <li class="itmeBorder">
                                <span class="regLogo">1</span>
                                <span class="color6">填写注册邮箱</span>
                            </li>
                            <li class="itmeTwo">
                                <span class="noRegLogo">2</span>
                                <span class="color6">激活账户</span>
                            </li>
                            <li>
                                <span class="noRegLogo">3</span>
                                <span class="color6">设置新密码</span>
                            </li>
                        </ul>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="regGroupContainer">
                    <div class="userContainer marginTop50 marginBottom20">
                        <input type="text" id="inputEmail" class="userStyle" placeholder="请输入注册邮箱"
                               ajaxurl="/member/checkUserEmailUnique.html" errormsg="{:L('_MI_EMAIL_ERROR_')}" nullmsg="{:L('_MI_EMAIL_')}"
                               datatype="e" value="" name="email" style="padding-left:10px!important">
                        <img class="userMsg" src="Application/Home/Static/bt/img/err_small_a1085c53.png" style="display: none"/>
                        <span class="size12 colorRed"></span>
                        <div class="userLogo"><img src="Application/Home/Static/bt/img/user/user.png" style="display: none"/></div>
                    </div>

                    <div class="userContainer" style="display: table;">
                        <div class="logoDisplay">
                            <input type="text" id="inputPassword" class="userStyle userCodeW" placeholder="{:L('_MI_CODE_')}"
                                   errormsg="{:L('_MI_CODE_ERROR_')}" nullmsg="{:L('_MI_CODE_NULL_')}" datatype="*5-5" name="verify">
                        </div>
                        <div class="logoDisplay  userLogoW" >
                            <img class="verifyimg reloadverify" alt="{:L('_MI_ALT_')}" src="{:U('verify')}"
                                 height="50"   style="cursor:pointer;max-width: 100%">
                        </div>
                        <img class="userMsg" src="Application/Home/Static/bt/img/err_small_a1085c53.png" style="display: none"/>
                        <span class="size12 colorRed"></span>
                        <div class="userLogo"><img src="Application/Home/Static/bt/img/user/user.png" style="display: none"/></div>
                    </div>

                    <div class="userContainer marginBottom20">
                        <div class="userLogoBtn stratHover">下一步</div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</block>
<block name="javascriptPageLeveCode">
    <script type="text/javascript">
        $(function () {
            $('.userLogoBtn').on('click',function(){
                $('.userMsg').hide();
                $('.colorRed').hide();
                var self = $("form");
                $.post(self.attr("action"), self.serialize(), success, "json");
                return false;
                function success(data) {
                    if (data.status) {
                        window.location.href = data.url
                    } else {
                        if(data.info.indexOf("验") >= 0){
                            $('.verifyimg').parent().nextAll('.userMsg').show();
                            $('.verifyimg').parent().nextAll('.colorRed').text(data.info).show();
                            $(".reloadverify").click();
                            return false;
                        }
                        $('#inputEmail').nextAll('.userMsg').show();
                        $('#inputEmail').nextAll('.colorRed').text(data.info).show();
                        $(".reloadverify").click();
                    }
                }
            });
            var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function () {
                if (verifyimg.indexOf('?') > 0) {
                    $(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
                } else {
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
                }
            });
        });
    </script>
</block>